var express = require('express');
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
  if(req.session.user){
    var user=req.session.user;
    var name=user.name;
    res.render('admin',{userName:name})
  }else{
    res.render('loginregist');
  }
});

module.exports = router;
